<%@page import="com.entities.report.actionscript.ActionScriptParserReportInfo"%>
<%@page import="com.entities.report.list.ReportListController"%>
<%@page import="com.core.utils.GlobalConstants"%>
<%@page import="com.entities.projectitem.actionscript.ActionScriptParserProjectDescription"%>
<%@page import="com.core.ui.actionscript.ActionScriptParser"%>
<%@page import="com.entities.projectitem.list.ProjectListController"%>
<%@page import="com.core.ui.controller.ActionBarController"%>
<%@page import="com.core.ui.controller.StackNavigatorController"%>
<%@page import="com.core.utils.StackItem"%>
<%@page import="com.core.managers.SessionManager"%>
<%@taglib prefix="sorokina" uri="/WEB-INF/Sorokina.tld"%>
<script type="text/javascript">
function deleteReport(reportId){
    var confirmResult = confirm("Are you sure to delete report?");
    if (confirmResult){

    	jQuery.post('<%=GlobalConstants.SERVLET_REPORTDELETE%>',
                {'id'        : reportId}
                ,function(data){
                    location.reload();
                }
        );

    }
}
</script>


<%

	SessionManager.addContext(GlobalConstants.USERCONTEXT_REPORTSLIST);
    String objectId = request.getParameter("id");

    ReportListController listController = new ReportListController();


    ActionScriptParserReportInfo actionScriptParser = new ActionScriptParserReportInfo();
    actionScriptParser.setReportId(objectId);


    ActionBarController actionBarController = new ActionBarController();
    actionBarController.setActionScriptParser(actionScriptParser);
%>


<div>

    <sorokina:ActionBarView datasource="<%=actionBarController %>" />
    <sorokina:TableView datasource="<%=listController%>" delegate="<%=listController%>" />
</div>